/**
 * @author caojj
 * @version 1.0.1.0
 */

try{XN}catch(ex){XN={}}



XN.Dictionary = {
	interest:{0 :"网络",1 :"汽车",2 :"摄影",3 :"影视音乐",4 :"读书写作",5 :"购物",6 :"手工艺",7 :"舞蹈",8 :"展览",9 :"烹饪",10:"绘画",11:"计算机",12:"体育运动",13:"旅游",14:"电子游戏",15:"其他"},
	attention:{0:"政治事件",1:"娱乐八卦",2:"体育赛事",3:"理财投资",4:"相声曲艺",5:"海选活动",6:"畅销书",7:"影视热片",8:"休闲生活",9:"行业发展",10:"其他",11:"暂无"},
	likeSports:{0:"足球",1:"篮球",2:"排球",3:"网球",4:"羽毛球",5:"乒乓球",6:"壁球",7:"保龄球",8:"手球",9:"橄榄球",10:"棒球",11:"高尔夫",12:"健身",13:"跑步",14:"自行车",15:"摩托车",16:"汽车",17:"舞蹈",18:"体操",19:"跆拳道",20:"柔道",21:"空手道",22:"游泳",23:"潜水",24:"水上运动",25:"航海",26:"滑雪/滑冰",27:"拳击",28:"钓鱼",29:"其他",30:"不喜欢运动"},
	likeCate:{0:"中国菜",1:"印度菜",2:"泰国菜",3:"法国菜",4:"意大利菜",5:"俄罗斯菜",6:"日本菜",7:"烧烤",8:"健康食品",9:"素食",10:"快餐",11:"巧克力和甜点",12:"其他",13:"无特别爱好"},
	nextTour:{0:"惬意海岛",1:"名山古刹",2:"繁华都市",3:"风情名城",4:"广袤森林",5:"高原雪域",6:"秀美山水",7:"历史遗迹",8:"江河大川",9:"峻秀峡谷",10:"小桥流水人家",11:"其他选择",12:"还没想好"},
	onlineGame:{0 :"诛仙",1 :"征服",2 :"征途",3 :"踢踢球",4 :"劲舞团",5 :"突袭OL",6 :"三国策",7 :"梦幻西游",8 :"富甲西游",9 :"超级舞者",10:"特种部队",11:"剑侠情缘II",12:"超级武林大富翁",13:"机战",14:"传奇",15:"大话",16:"龙骑士",17:"QQ三国",18:"冒险岛",19:"英雄II",20:"超级跑跑",21:"奇迹世界",22:"魔兽世界",23:"幻想大陆",24:"新天翼之链",25:"布鲁布鲁卡卡",26:"传三",27:"神泣",28:"Fol",29:"大话三",30:"天下贰",31:"舞街区",32:"特勤队",33:"热血江湖",34:"完美世界",35:"天龙八部",36:"雄霸天下",37:"如来神掌OL",38:"丢丢球",39:"抗战",40:"刀剑",41:"蒸汽",42:"奇迹",43:"激战",44:"彩虹岛",45:"QQ幻想",46:"海盗王",47:"街头篮球",48:"春秋Ｑ传",49:"宝贝坦克",50:"拍拍部落",51:"炮炮火枪手",52:"劲舞世界",53:"O-2",54:"战国",55:"天机",56:"机甲",57:"巨人",58:"天骄II",59:"QQ华夏",60:"星钻三",61:"光线飞车",62:"完美国际",63:"惊天动地",64:"三国群英",65:"跑跑卡丁车",66:"天上人间",67:"九洲",68:"冲锋",69:"魔域",70:"苍天",71:"黄易",72:"新魔界",73:"无厘头",74:"灵游记",75:"武林外传",76:"卓越之剑",77:"光之国度",78:"合金战纪",79:"战火·红警",80:"时空之泪",81:"乱武",82:"烈焰飞雪",83:"圣传OL",84:"封印传说",85:"开创世纪",86:"炎黄传说",87:"指环王OL",88:"风火之旅",89:"纸客帝国",90:"魔力II",91:"功夫世界",92:"赤壁",93:"童年"},

	sex : {1:"型男",0:"靓女"},
	genus : {1:"鼠",2:"牛",3:"虎",4:"兔",5:"龙",6:"蛇",7:"马",8:"羊",9:"猴",10:"鸡",11:"狗",12:"猪"},
	constellation : {1:"白羊座",2:"金牛座",3:"双子座",4:"巨蟹座",5:"狮子座",6:"处女座",7:"天秤座",8:"天蝎座",9:"射手座",10:"摩羯座",11:"水瓶座",12:"双鱼座"},
	blood : {0:"其他", 1:"O", 2:"A", 3:"B", 4:"AB"},
	knowledge : {0:"小学",1:"初中",2:"高中",3:"专科",4:"本科",5:"硕士",6:"博士",7:"博士后"},
	
	friendMotive : {0:"约会",1:"认真交往",2:"社交",3:"爱情",4:"征婚",5:"思想交流",6:"都可以"},
	stature : {0:"不到140cm",1:"140cm~150cm",2:"151cm~155cm",3:"156cm~160cm",4:"161cm~165cm",5:"166cm~170cm",6:"171cm~175cm",7:"176cm~180cm",8:"181cm~185cm",9:"186cm~190cm",10:"191cm~195cm",11:"196cm~200cm",12:"200cm以上"},
	avoirdupois : {0:"不到40kg",1:"40kg~45kg",2:"46kg~50kg",3:"51kg~55kg",4:"56kg~60kg",5:"61kg~65kg",6:"66kg~70kg",7:"71kg~75kg",8:"76kg~80kg",9:"81kg~85kg",10:"86kg~90kg",11:"91kg~95kg",12:"96kg~100kg",13:"100kg以上"},
	face : {0:"保密",1:"圆脸型",2:"方脸型",3:"长脸型",4:"瓜子脸型",5:"鸭蛋脸型",6:"国字脸型",7:"三角脸型",8:"菱形脸型"},
	build : {0:"保密",1:"瘦",2:"较瘦",3:"匀称",4:"苗条",5:"高挑",6:"丰满",7:"健壮",8:"魁梧",9:"胖",10:"较胖"},
	character : {0:"保密",1:"浪漫迷人",2:"成熟稳重",3:"风趣幽默",4:"乐天达观",5:"活泼可爱",6:"忠厚老实",7:"淳朴害羞",8:"温柔体贴",9:"多愁善感",10:"新潮时尚",11:"热辣动感",12:"豪放不羁"},
	autocritical : {0:"保密",1:"青蛙",2:"平平",3:"中等",4:"比较帅",5:"帅呆了",6:"普通",7:"有气质",8:"中上",9:"美丽",10:"美极了"},
	isSmoke : {0:"不抽烟",1:"偶尔会抽",2:"烟鬼",3:"正在戒烟",4:"已经戒了",5:"心情不好时抽"},
	isDrink : {0:"从不喝",1:"应酬时喝一些",2:"酒鬼",3:"正在戒酒",4:"已经戒了",5:"心情不好时喝"}
}

XN.Dictionary.countries = {2331:"乌兹别克斯坦",2:"美国",1810:"特立尼达和多巴哥",506:"哥斯达黎加",53:"古巴",357:"塞浦路斯",420:"捷克",45:"丹麦",253:"吉布提",1890:"多米尼加共和国",593:"厄瓜多尔",20:"埃及",503:"萨尔瓦多",372:"爱沙尼亚",251:"埃塞俄比亚",679:"斐济",358:"芬兰",33:"法国",594:"法属圭亚那",241:"加蓬",220:"冈比亚",995:"格鲁吉亚",49:"德国",233:"加纳",350:"直布罗陀",30:"希腊",1809:"格林纳达",1671:"关岛",502:"危地马拉",224:"几内亚",592:"圭亚那",509:"海地",504:"洪都拉斯",36:"匈牙利",354:"冰岛",91:"印度",62:"印度尼西亚",98:"伊朗",964:"伊拉克",353:"爱尔兰",972:"以色列",39:"意大利",225:"科特迪瓦",1876:"牙买加",81:"日本",962:"约旦",855:"柬埔寨",327:"哈萨克斯坦",254:"肯尼亚",82:"韩国",965:"科威特",331:"吉尔吉斯坦",856:"老挝",371:"拉脱维亚",961:"黎巴嫩",266:"莱索托",231:"利比里亚",218:"利比亚",423:"列支敦士登",370:"立陶宛",352:"卢森堡",261:"马达加斯加",265:"马拉维",60:"马来西亚",960:"马尔代夫",223:"马里",356:"马耳他",1670:"马里亚那群岛",596:"马提尼克",230:"毛里求斯",52:"墨西哥",373:"摩尔多瓦",377:"摩纳哥",976:"蒙古",1664:"蒙特塞拉特岛",212:"摩洛哥",258:"莫桑比克",264:"纳米比亚",674:"瑙鲁",977:"尼泊尔",599:"荷属安的列斯",31:"荷兰",64:"新西兰",505:"尼加拉瓜",227:"尼日尔",234:"尼日利亚",850:"朝鲜",47:"挪威",968:"阿曼",92:"巴基斯坦",507:"巴拿马",675:"巴布亚新几内亚",595:"巴拉圭",51:"秘鲁",63:"菲律宾",48:"波兰",689:"法属玻利尼西亚",351:"葡萄牙",1787:"波多黎各",974:"卡塔尔",262:"留尼旺",40:"罗马尼亚",7:"俄罗斯",1758:"圣卢西亚",1784:"圣文森特岛",684:"东萨摩亚(美)",685:"西萨摩亚",378:"圣马力诺",239:"圣多美和普林西比",966:"沙特阿拉伯",221:"塞内加尔",248:"塞舌尔",232:"塞拉利昂",65:"新加坡",421:"斯洛伐克",386:"斯洛文尼亚",677:"所罗门群岛",252:"索马里",27:"南非",34:"西班牙",94:"斯里兰卡",249:"苏丹",597:"苏里南",268:"斯威士兰",46:"瑞典",41:"瑞士",963:"叙利亚",992:"塔吉克斯坦",255:"坦桑尼亚",66:"泰国",228:"多哥",676:"汤加",216:"突尼斯",90:"土耳其",993:"土库曼斯坦",256:"乌干达",380:"乌克兰",971:"阿拉伯联合酋长国",44:"英国",598:"乌拉圭",58:"委内瑞拉",84:"越南",967:"也门",381:"南斯拉夫",263:"津巴布韦",243:"扎伊尔",260:"赞比亚",244:"安哥拉",93:"阿富汗",355:"阿尔巴尼亚",213:"阿尔及利亚",376:"安道尔共和国",1264:"安圭拉岛",1268:"安提瓜和巴布达",54:"阿根廷",374:"亚美尼亚",247:"阿森松",61:"澳大利亚",43:"奥地利",994:"阿塞拜疆",1242:"巴哈马",973:"巴林",880:"孟加拉国",1246:"巴巴多斯",375:"白俄罗斯",32:"比利时",501:"伯利兹",229:"贝宁",1441:"百慕大群岛",591:"玻利维亚",267:"博茨瓦纳",55:"巴西",673:"文莱",359:"保加利亚",226:"布基纳法索",95:"缅甸",257:"布隆迪",237:"喀麦隆",1:"加拿大",1345:"开曼群岛",236:"中非共和国",235:"乍得",56:"智利",86:"中国",57:"哥伦比亚",242:"刚果",682:"库克群岛"};
XN.Dictionary.province = {0:"北京",1:"天津",2:"上海",3:"重庆",4:"河北",5:"河南",6:"黑龙江",7:"吉林",8:"辽宁",9:"山东",10:"内蒙古",11:"江苏",12:"安徽",13:"山西",14:"陕西",15:"甘肃",16:"浙江",17:"江西",18:"湖北",19:"湖南",20:"贵州",21:"四川",22:"云南",23:"新疆",24:"宁夏",25:"青海",26:"西藏",27:"广西",28:"广东",29:"福建",30:"海南",31:"台湾",32:"香港",33:"澳门"};
XN.Dictionary.cities = {0:{0:"昌平",1:"朝阳",2:"崇文",3:"大兴",4:"东城",5:"房山",6:"丰台",7:"海淀",8:"怀柔",9:"门头沟",10:"密云",11:"平谷",12:"石景山",13:"顺义",14:"通州",15:"西城",16:"宣武",17:"延庆"},1:{100:"宝坻",101:"北辰",102:"大港",103:"东丽",104:"汉沽",105:"和平",106:"河北",107:"河东",108:"河西",109:"红桥",110:"蓟县",111:"津南",112:"静海",113:"南开",114:"宁河",115:"塘沽",116:"武清",117:"西青"},2:{200:"宝山",201:"长宁",202:"崇明",203:"奉贤",204:"虹口",205:"黄浦",206:"嘉定",207:"金山",208:"静安",209:"卢湾",210:"闵行",211:"南汇",212:"浦东",213:"普陀",214:"青浦",215:"松江",216:"徐汇",217:"杨浦",218:"闸北"},3:{300:"巴南",301:"北碚",302:"璧山",303:"长寿",304:"城口",305:"大渡口",306:"大足",307:"垫江",308:"丰都",309:"奉节",310:"涪陵",311:"合川",312:"江北",313:"江津",314:"九龙坡",315:"开县",316:"梁平",317:"南岸",318:"南川",319:"彭水",320:"綦江",321:"黔江",322:"荣昌",323:"沙坪坝",324:"石柱双桥",325:"铜梁",326:"潼南",327:"万盛",328:"万州",329:"巫山",330:"巫溪",331:"武隆",332:"秀山",333:"永川",334:"酉阳",335:"渝北",336:"渝中",337:"云阳",338:"忠县"},4:{400:"石家庄",401:"保定",402:"沧州",403:"承德",404:"邯郸",405:"衡水",406:"廊坊",407:"秦皇岛",408:"唐山",409:"邢台",410:"张家口"},5:{500:"郑州",501:"安阳",502:"鹤壁",503:"焦作",504:"开封",505:"洛阳",506:"漯河",507:"南阳",508:"平顶山",509:"濮阳",510:"三门峡",511:"商丘",512:"新乡",513:"信阳",514:"许昌",515:"周口",516:"驻马店"},6:{600:"哈尔滨",601:"大庆",602:"大兴安岭",603:"鹤岗",604:"黑河",605:"鸡西",606:"佳木斯",607:"牡丹江",608:"七台河",609:"齐齐哈尔",610:"双鸭山",611:"绥化",612:"伊春"},7:{700:"长春",701:"白城",702:"白山",703:"吉林",704:"辽源",705:"四平",706:"松原",707:"通化",708:"延边"},8:{800:"沈阳",801:"鞍山",802:"本溪",803:"朝阳",804:"大连",805:"丹东",806:"抚顺",807:"阜新",808:"葫芦岛",809:"锦州",810:"辽阳",811:"盘锦",812:"铁岭",813:"营口"},9:{900:"济南",901:"滨州",902:"德州",903:"东营",904:"菏泽",905:"济宁",906:"莱芜",907:"聊城",908:"临沂",909:"青岛",910:"日照",911:"泰安",912:"威海",913:"潍坊",914:"烟台",915:"枣庄",916:"淄博"},10:{1000:"呼和浩特",1001:"阿拉善",1002:"巴彦淖尔",1003:"包头",1004:"赤峰",1005:"鄂尔多斯",1006:"呼伦贝尔",1007:"通辽",1008:"乌海",1009:"乌兰察布",1010:"锡林",1011:"郭勒",1012:"兴安"},11:{1100:"南京",1101:"常州",1102:"淮安",1103:"连云港",1104:"南通",1105:"苏州",1106:"宿迁",1107:"泰州",1108:"无锡",1109:"徐州",1110:"盐城",1111:"扬州",1112:"镇江"},12:{1200:"合肥",1201:"安庆",1202:"蚌埠",1203:"亳州",1204:"巢湖",1205:"池州",1206:"滁州",1207:"阜阳",1208:"淮北",1209:"淮南",1210:"黄山",1211:"六安",1212:"马鞍山",1213:"宿州",1214:"铜陵",1215:"芜湖",1216:"宣城"},13:{1300:"太原",1301:"长治",1302:"大同",1303:"晋城",1304:"晋中",1305:"临汾",1306:"吕梁",1307:"朔州",1308:"忻州",1309:"阳泉",1310:"运城"},14:{1400:"西安",1401:"安康",1402:"宝鸡",1403:"汉中",1404:"商洛",1405:"铜川",1406:"渭南",1407:"咸阳",1408:"延安",1409:"榆林"},15:{1500:"兰州",1501:"白银",1502:"定西",1503:"甘南",1504:"嘉峪关",1505:"金昌",1506:"酒泉",1507:"临夏",1508:"陇南",1509:"平凉",1510:"庆阳",1511:"天水",1512:"武威",1513:"张掖"},16:{1600:"杭州",1601:"湖州",1602:"嘉兴",1603:"金华",1604:"丽水",1605:"宁波",1606:"衢州",1607:"绍兴",1608:"台州",1609:"温州",1610:"舟山"},17:{1700:"南昌",1701:"抚州",1702:"赣州",1703:"吉安",1704:"景德镇",1705:"九江",1706:"萍乡",1707:"上饶",1708:"新余",1709:"宜春",1710:"鹰潭"},18:{1800:"武汉",1801:"鄂州",1802:"恩施",1803:"黄冈",1804:"黄石",1805:"荆门",1806:"荆州",1807:"潜江",1808:"神农架",1809:"十堰",1810:"随州",1811:"天门",1812:"仙桃",1813:"咸宁",1814:"襄樊",1815:"孝感",1816:"宜昌"},19:{1900:"长沙",1901:"常德",1902:"郴州",1903:"衡阳",1904:"怀化",1905:"娄底",1906:"邵阳",1907:"湘潭",1908:"湘西",1909:"益阳",1910:"永州",1911:"岳阳",1912:"张家界",1913:"株洲"},20:{2000:"贵阳",2001:"安顺",2002:"毕节",2003:"六盘水",2004:"黔东南",2005:"黔南",2006:"黔西南",2007:"铜仁",2008:"遵义"},21:{2100:"成都",2101:"阿坝",2102:"巴中",2103:"达州",2104:"德阳",2105:"甘孜",2106:"广安",2107:"广元",2108:"乐山",2109:"凉山",2110:"泸州",2111:"眉山",2112:"绵阳",2113:"内江",2114:"南充",2115:"攀枝花",2116:"遂宁",2117:"雅安",2118:"宜宾",2119:"资阳",2120:"自贡"},22:{2200:"昆明",2201:"保山",2202:"楚雄",2203:"大理",2204:"德宏",2205:"迪庆",2206:"红河",2207:"丽江",2208:"临沧",2209:"怒江",2210:"曲靖",2211:"思茅",2212:"文山",2213:"西双版纳",2214:"玉溪",2215:"昭通"},23:{2300:"乌鲁木齐",2301:"阿克苏",2302:"阿拉尔",2303:"阿勒泰",2304:"巴音郭楞",2305:"博尔塔拉",2306:"昌吉",2307:"哈密",2308:"和田",2309:"喀什",2310:"克拉玛依",2311:"克孜勒苏柯尔克孜",2312:"石河子",2313:"塔城",2314:"图木舒克",2315:"吐鲁番",2316:"五家渠",2317:"伊犁"},24:{2400:"银川",2401:"固原",2402:"石嘴山",2403:"吴忠",2404:"中卫"},25:{2500:"西宁",2501:"果洛",2502:"海北",2503:"海东",2504:"海南",2505:"海西",2506:"黄南",2507:"玉树"},26:{2600:"拉萨",2601:"阿里",2602:"昌都",2603:"林芝",2604:"那曲",2605:"日喀则",2606:"山南"},27:{2700:"桂林",2701:"百色",2702:"北海",2703:"崇左",2704:"防城港",2705:"贵港",2706:"河池",2707:"贺州",2708:"来宾",2709:"柳州",2710:"南宁",2711:"钦州",2712:"梧州",2713:"玉林"},28:{2800:"广州",2801:"潮州",2802:"东莞",2803:"佛山",2804:"河源",2805:"惠州",2806:"江门",2807:"揭阳",2808:"茂名",2809:"梅州",2810:"清远",2811:"汕头",2812:"汕尾",2813:"韶关",2814:"深圳",2815:"阳江",2816:"云浮",2817:"湛江",2818:"肇庆",2819:"中山",2820:"珠海"},29:{2900:"福州",2901:"龙岩",2902:"南平",2903:"宁德",2904:"莆田",2905:"泉州",2906:"三明",2907:"厦门",2908:"漳州"},30:{3000:"海口",3001:"白沙",3002:"保亭",3003:"昌江",3004:"澄迈",3005:"儋州",3006:"定安",3007:"东方",3008:"乐东",3009:"临高",3010:"陵水",3011:"南沙群岛琼海",3012:"琼中",3013:"三亚",3014:"屯昌",3015:"万宁",3016:"文昌",3017:"五指山",3018:"西沙群岛",3019:"中沙群岛"},31:{3100:"台北",3101:"阿莲",3102:"安定",3103:"安平",3104:"八德",3105:"八里",3106:"白河",3107:"白沙",3108:"板桥",3109:"褒忠",3110:"宝山",3111:"卑南",3112:"北斗",3113:"北港",3114:"北门",3115:"北埔",3116:"北投",3117:"补子",3118:"布袋",3119:"草屯",3120:"长宾",3121:"长治",3122:"潮州",3123:"车城",3124:"成功",3125:"城中区",3126:"池上",3127:"春日",3128:"刺桐",3129:"高雄",3130:"花莲",3131:"基隆",3132:"嘉义",3133:"苗栗",3134:"南投",3135:"屏东",3136:"台东",3137:"台南",3138:"台中",3139:"桃园",3140:"新竹",3141:"宜兰",3142:"彰化"},32:{3200:"北区",3201:"大埔区",3202:"东区",3203:"观塘区",3204:"黄大仙区",3205:"九龙",3206:"葵青",3207:"离岛",3208:"南区",3209:"荃湾区",3210:"沙田区",3211:"深水埗",3212:"屯门",3213:"湾仔",3214:"西贡",3215:"香港",3216:"新界",3217:"油尖旺",3218:"元朗",3219:"中西区"},33:{3300:"澳门"}};

XN.Dictionary.getcity = function(ctid) {
	var ret = "";
	ctid = ctid.toString();
	if(ctid.length>0) {
		if (ctid.length == 1) {
			ret = cities[0][ctid];
		} else {
			provid = ctid.substr(0, 1);
			ret = cities[provid][ctid];
			if (!ret) {
				provid = ctid.substr(0, 2);;
				ret = cities[provid][ctid];
			}
		}
	}
	return ret;
}

XN.Dictionary.mulitiSelect = ["interest", "attention", "likeSports", "likeCate", "nextTour"];
XN.Dictionary.singleSelect = ["friendMotive", "stature", "avoirdupois", "face", "build", "character", "isSmoke", "isDrink", "autocritical", "knowledge", "constellation"];


/**
 * @author caojj
 */
//var XN = {};

XN.MY_XN_COM_URL = {
	noteManage: "http://my.1.com/?menuGroup=blog",				//文章管理
	noteAdd: "http://my.1.com/?menuGroup=moveToArticleUp",		//添加文章
	
	musicManage: "http://my.1.com/?menuGroup=music",				//音乐管理
	musicAdd: "http://my.1.com/?menuGroup=moveToMusicUp",		//添加音乐
	musicBox: "",
	
	imageManage: "http://my.1.com/?menuGroup=picture",			//图片管理
	imageAdd: "http://my.1.com/?menuGroup=moveToPictureUp",		//添加图片
	
	videoManage: "http://my.1.com/?menuGroup=video",				//视频管理
	videoAdd: "http://my.1.com/?menuGroup=moveToVideoUp",		//添加视频
	
	profileManage: "http://my.1.com/?menuGroup=profile",			//资料管理
	
	messageManage: "http://my.1.com/?menuGroup=inBox"			//留言管理
}

XN.navigateToManage = function(url, sameWin) {
	if (sameWin) {
		if (typeof(sameWin) == "boolean") {
			window.open(url, "zoneManage");
		} else {
			window.open(url, sameWin);
		}		
	} else {
		window.open(url);
	}	
}



XN.SERVER_IDKEYS = {
	0:	"VIP",
	50: "进入地盘",
	51: "进入博客",
	52: "虚拟形象",
	53: "家园",
	
	10: "黑暗与光明",
	4: "舞街区",
	1: "航海世纪",
	3: "机甲世纪",
	
	5: "超级武林大富翁",

	54: "聊吧",
	55: "情侣园"
}
XN.SERVER_HOMEPAGE = {
	5: "http://wl.woniu.com/",
	10: "http://dnl.woniu.com/",
	4: "http://5jq.woniu.com/",
	3:	"http://aoa.woniu.com/",
	1:	"http://vc.woniu.com/",
	
	52: "http://show.1.com",
	51: "http://blog.1.com/$1.blog",
	50: "http://www.1.com/$1.home"
}

XN.SERVER_REGISTERPAGE = {
	
}




XN.OPT_TYPE = {}
XN.OPT_TYPE.addRes = {key:1000001, des:"发表了"}	//
XN.OPT_TYPE.editRes = {key:1000010, des:"修改了"}
XN.OPT_TYPE.delRes = {key:1000011, des:"删除了"}
XN.OPT_TYPE.browse = {key:1000100, des:"浏览了"}		//
XN.OPT_TYPE.comment = {key:1000101, des:"评论了"}		//
XN.OPT_TYPE.delComment = {key:1001001, des:"删除了评论"}
XN.OPT_TYPE.leaveMsg = {key:1000111, des:"发表了一条"}		//
XN.OPT_TYPE.msgReply = {key:1001010, des:"回复了留言"}
XN.OPT_TYPE.grade = {key:5000010, des:"评分"}
XN.OPT_TYPE.openRes = {key:1001000, des:"开放了资源"}
XN.OPT_TYPE.templetStat = {key:5000001, des:"博客模板统计"}

/**
 * 通过key获取操作类型描述
 * @param {Number} key
 */
XN.getOptTypeDesByKey = function(key) {
	var retDes = "";
	key = Number(key);
	
	for (var tp in  XN.OPT_TYPE) {
		if (XN.OPT_TYPE[tp].key == key) {
			retDes = XN.OPT_TYPE[tp].des;
			break;
		}
	}
	
	return retDes;
}

XN.RES_TYPE = {
	music: {key:1, des:"音乐"},
	deadal: {key:2, des:"百变"},
	note: {key:3, des:"文章"},
	message: {key:4, des:"留言"},
	video: {key:5, des:"视频"},
	image: {key:6, des:"图片"},
//	圈子: 7,
//	关注: 8,
//	名片: 9,
//	公告: 10,
//	心情日记: 51,
	zone: {key:52, des:"地盘"},
//	链接: 53,
//	相册集: 54,
//	视频现场: 55,
//	影视直播室: 56,
	blog: {key:57, des:"博客"}
}

/**
 * 通过key获取资源类型描述
 * @param {Number} key
 */
XN.getResTypeDesByKey = function(key) {
	var retDes = "";
	key = Number(key);
	
	for (var tp in  XN.RES_TYPE) {
		if (XN.RES_TYPE[tp].key == key) {
			retDes = XN.RES_TYPE[tp].des;
			break;
		}
	}
	
	return retDes;
}

/*********************事件发送(现在只发送浏览事件)**************************/
XN.Event = {};
XN.Event.PostVars = function() {
	this.eventType = "";	//事件类型（必填）：[eventType=10000001/增加资源][eventType=1000010/修改资源][eventType=1000011/删除资源][eventType=1000100/浏览] [eventType=1000101/评论][eventType=1000111/留言][eventType=1001010/留言回复][eventType=5000010/评分][eventType=1001000/资源开放][eventType=5000001/博客模板统计] 
	this.receiveId = "";		//事件接收者ID（可为空，但不能与资源ID同时为空） 
	this.resType = "";		//资源类型编码(见数据字典）可为空 
	this.resId = "";			//资源ID（可为空，但不能与事件接收者ID不能同时为空） 
	this.resName = "";		//资源名称（可为空） 
	this.sendName = "";		//发送者名称（可为空） 
	this.receiveName = "";	//接收者名称（可为空） 
	this.count = "";			//事件触发数量，如评论删除数量（可为空） 
	this.sendId = "";		//事件发送者ID（可为空） 
}

//sendId(添加/修改)了 资源为resId 的 名称为resName 的 类型为resType 。
//sendId(查看/评论)了 receiveId 的 资源为resId 的 名称为resName 的 类型为resType 。 
XN.Event.sendEvent = function(sendId,sendName, eventType, receiveId,receiveName, resId, resName, resType, count) {
	var eventConfig = new XN.Event.PostVars();
	eventConfig.sendId = sendId;
	eventConfig.sendName = sendName;
	eventConfig.eventType = eventType;
	eventConfig.receiveId = receiveId;
	eventConfig.receiveName = receiveName;
	eventConfig.resId = resId;
	eventConfig.resName = resName;
	eventConfig.resType = resType;
	eventConfig.count = count;
	
	var ajaxSv = new FWK.Util.Ajax("/event.do", "POST",eventConfig, "async");
//	ajaxSv.debug = true;
	ajaxSv.open();
	ajaxSv.$success = function(){
	}
	ajaxSv.$fail = function(){
	}
}

//图片视频音乐日志　增加　上传　修改 《--机制变更
XN.Event.EventSender = {
	addPhoto : function(whomId, whomName, resId, resName) {
//		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.addRes.key, null, null, resId, resName, XN.RES_TYPE.photo);
	},
	addPhotoList : function(whomId, whomName, resId, resName) {
////		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.addRes.key, null, null, resId, resName, XN.RES_TYPE.photoList);
	},
	addBlog : function(whomId, whomName, resId, resName) {
//		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.addRes.key, null, null, resId, resName, XN.RES_TYPE.blog);
	},
	addBlogComment : function(whomId, whomName, whosId, whosName, resId, resName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.comment.key, whosId, whosName, resId, resName, XN.RES_TYPE.blog.key);
	},
	delBlogComment : function(whomId, whomName, resId, resName, count) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.delComment.key, null,null, resId, resName, XN.RES_TYPE.blog.key, count);
	},
	
	updateBlog : function(whomId, whomName, resId, resName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.editRes.key, null,null, resId, resName, XN.RES_TYPE.blog.key);
	},
	
	deletePhoto : function(whomId, whomName, resId, resName) {
//		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.delRes.key, null, null, resId, resName, XN.RES_TYPE.photo);
	},
	deleteBlog : function(whomId, whomName, resId, resName) {
//		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.delRes.key, null, null, resId, resName, XN.RES_TYPE.blog);
	},
	
	viewPhoto : function(whomId, whomName, whosId, whosName, resId, resName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.browse.key, whosId, whosName, resId, resName, XN.RES_TYPE.image.key);
	},
	viewBlog : function(whomId, whomName, whosId, whosName, resId, resName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.browse.key, whosId, whosName, resId, resName, XN.RES_TYPE.note.key);
	},
	viewVideo : function(whomId, whomName, whosId, whosName, resId, resName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.browse.key, whosId, whosName, resId, resName, XN.RES_TYPE.video.key);
	},
	viewZone : function(whomId, whomName, whosId, whosName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.browse.key, whosId, whosName, null, null, XN.RES_TYPE.zone.key);
	},
	viewBlogSpace : function(whomId, whomName, whosId, whosName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.browse.key, whosId, whosName, null, null, XN.RES_TYPE.blogSpace.key);
	},
	leaveMessage : function(whomId, whomName, whosId, whosName, resId, resName) {
		XN.Event.sendEvent(whomId, whomName, XN.OPT_TYPE.leaveMsg.key, whosId, whosName, resId, resName, XN.RES_TYPE.message.key);
	}
}